#ifndef _VMAXHEAP_H
#define _VMAXHEAP_H

#include <stdint.h>

struct vheap_object
{
    double value;
    void * data;
};


typedef struct vmaxheap vmaxheap_t;
struct vmaxheap {
    uint32_t sz;
    uint32_t alloc_sz;
    struct vheap_object * objs;

    uint32_t (*get_size)(vmaxheap_t *vh);
    void (*add)(vmaxheap_t * vh, const double value, void * data);
    void * (*remove_max)(vmaxheap_t * vh);
};

vmaxheap_t * vmaxheap_init(uint32_t sz);
void vmaxheap_destroy(vmaxheap_t * vh);

#endif
